RowResize Event

       

Occurs when a user resizes a row in a DataGrid control.

Syntax

Private Sub object_RowResize ([ index As Integer,] cancel As Integer)

The RowResize event syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
index An integer that identifies a control if it is in a control array.
cancel A Boolean expression that determines if a change is canceled, as described in Settings.

Settings

The settings for cancel are:

Setting Description
True Cancels the change and restores row to its original height.
False (Default) Continues with change of row height.

Remarks

The user can resize the DataGrid control rows using the mouse. When the user changes the height, the RowResize event is triggered. Your event procedure can accept the change, alter the degree of change, or cancel the change completely.

The DataGrid control's RowHeight property determines the height for all rows in the control.

If you set the cancel argument to True, the row height is restored. To alter the degree of change, set the RowHeight property to the desired value.

Executing the Refresh method within the procedure causes the control to be repainted even if the cancel argument is True.